package com.example.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.example.entity.SysUser;
import com.example.repository.SysUserRepository;
import com.example.service.ISysLoginService;

@Service
public class SysLoginServiceImpl implements ISysLoginService {

	@Autowired
	private SysUserRepository sysUserRepository;

	@Cacheable(value = "sysUsers", keyGenerator = "wiselyKeyGenerator")
	@Override
	public List<SysUser> getSysUsers() {
		return (List<SysUser>) sysUserRepository.findAll();
	}
}
